@extends('layouts.default')
@section('main')
    <script type="text/javascript" src="{{URL::asset('js/')}}/common.js"></script>
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i
                            class="icon-home"></i> 首页</a>
                <a href="{{url('projectcomment/index?id='.$list->project_id)}}" class="tip-bottom">评论列表</a>
                <a href="#" class="current">编辑是否精彩</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span7">
                    <div class="widget-box">
                        <div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i>
						</span>
                            <h5>编辑是否精彩</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <form action="{{url('projectcomment/edit')}}" id="adForm" method="post" class="form-horizontal">

                                <div class="control-group">
                                    <label class="control-label"><span class="redD">*</span>是否精彩 :</label>
                                    <div class="controls">
                                        <select  name="wonderful" class="span11" >
                                            <option >请选择</option>
                                            <option value="1" @if(1==$list->wonderful) selected @endif>精彩</option>
                                            <option value="0" @if(0==$list->wonderful) selected @endif>不精彩</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <input type="hidden" name="id" value="{{$list->id}}">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <button type="button" id="doSave" class="btn btn-success">确认修改</button>
                                </div>
                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $("#doSave").click(function(){
            ajaxRequest($('#adForm').serializeArray(),$('#adForm').attr('action'),function(data){
                if(data.status){
                    alert(data.message);
                    window.location.href = data.forwardUrl;
                }else{
                    alert(data.message);
                }
            });
        });
    </script>
@stop
